<template lang="pug">
    div(class="amount-control", v-if="visible")
        div(class="header")
        div(class="body")
            div() {{model.name}}
            div(class="amount") 
                span {{model.amount}}{{model.unit}}
                i(class="iconfont") &#xe60b;

</template>

<script>
export default {
  name: "amount-control",
  props:{
      model:{type:Object, default(){
          return {
              amount:0,
              name: '无标题',
              unit: 'U'
          }
       }},
      visible: {type:Boolean,default: false},
  },
  model: {event:'update', prop: "model"},
  methods: {
    
  }
};
</script>
